//
//  SABaseViewController.m
//  SAP
//
//  Created by 中矿科技有限公司 on 17/9/8.
//  Copyright © 2017年 中矿科技有限公司. All rights reserved.
//

#import "SABaseViewController.h"

#import "LeftSideDrawerViewController.h"
#import "SANavigationViewController.h"

@interface SABaseViewController ()

@end

@implementation SABaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor =[UIColor colorFromHex:@"f1f2f5"];
    [self setupLeftMenuButton];
    
}
-(void)setupLeftMenuButton{
    self.navigationController.navigationBar.tintColor =[UIColor whiteColor];
    MMDrawerBarButtonItem * leftDrawerButton = [[MMDrawerBarButtonItem alloc] initWithTarget:self action:@selector(leftDrawerButtonPress:)];
    [self.navigationItem setLeftBarButtonItem:leftDrawerButton animated:YES];
}
-(void)leftDrawerButtonPress:(id)sender{
    [self.mm_drawerController toggleDrawerSide:MMDrawerSideLeft animated:YES completion:nil];
}

-(void)viewWillAppear:(BOOL)animated{
    [self.mm_drawerController setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll];
    
    self.mm_drawerController.openDrawerGestureModeMask = MMOpenDrawerGestureModeAll;
}
-(void)viewWillDisappear:(BOOL)animated{

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
